<?php

/**
 * Created by PhpStorm.
 * User: yellow
 * Date: 2017/6/15
 * Time: 15:41
 */

namespace Service;

use Think\Page;

class BaseService
{

    protected static $pageNum;
    protected static $pageObj;
    protected $shopId;

    public function __construct()
    {

        self::$pageNum = 10;

    }

    protected static function resReturn($code = 200, $msg = 'success', $data = array()){

        $result['code'] = $code;
        $result['msg'] = $msg;
        $result['data'] = $data;

        return $result;

    }

    protected static function bPage($totalCount = 0){

        self::$pageObj = new Page($totalCount, self::$pageNum);

    }

}